package com.superarai.portal.action;

import javax.annotation.Resource;

import org.seasar.struts.annotation.Execute;

import com.superarai.portal.dto.LoginInfoDto;

public class LogoutAction {
	
	@Resource
	protected LoginInfoDto loginInfoDto;
	
	@Execute(validator = false)
	public String index() {
		if(!loginInfoDto.isLogin())
			return "/?redirect=true";
			
		return "logout.jsp";
	}
	
	@Execute(validator = false)
	public String doLogout() {
		loginInfoDto.logout();
		return "/?redirect=true";
	}
}
